package com.fashion.model;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: gnyk
 * Date: 13-9-3
 */
//access record of news
@Entity
@Table(name = "NewsRecord")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class NewsRecord {
    @Id
    @Column
    private String id;
    @Column
    private String creatorId;
    @Column
    private int accessNumber;
    @Column
    private Date accessDate;  //date should be like 201309, 201312, only in month

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public int getAccessNumber() {
        return accessNumber;
    }

    public void setAccessNumber(int accessNumber) {
        this.accessNumber = accessNumber;
    }

    public Date getAccessDate() {
        return accessDate;
    }

    public void setAccessDate(Date accessDate) {
        this.accessDate = accessDate;
    }
}
